<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>水仙花数</title>
	</head>
	<body>
		<p>100至999之间的所有水仙花数：</p>
		<script>
			var a,b,c;
			for(i=100;i<1000;i++){
			a=parseInt(i/100);
			b=parseInt((i-a*100)/10);
			c=parseInt(i-a*100-b*10);
			if( a*a*a+b*b*b+c*c*c == i){
			document.write(i+"<br>");
			}
		}
		</script>
	</body>
</html>
